<div class='right-cont right-cont-less' ng-controller='RadioMorningList'>
    <div class='title'>健康电台<i class='fa fa-spinner fa-spin' ng-if='loading'></i></div>
    <div class='content'>
        <ul class='nav nav-tabs nav-tabs-a'>
            <li class='active'>
                <a data-target='#list-all' data-toggle='tab'>全部</a>
            </li>
            <li><a data-target='#list-normal' data-toggle='tab'>正常</a></li>
            <li><a data-target='#list-try' data-toggle='tab'>试听</a></li>
            <div class='box-btn'>
                <!-- <button class='btn btn-primary' data-toggle='modal' data-target='.add-radio'>添加</button> -->
                <button class='btn btn-primary' ng-click='add_item()'>添加</button>
            </div>
        </ul>

        <div class='tab-content tab-content-a'>
            <div class='tab-pane fade in active' id='list-all'>
                <table class='table table-list'>
                    <tr>
                        <td>电台ID <span class='fa fa-sort'></span></td>
                        <td>标题<span class='fa fa-sort'></span></td>
                        <td>横幅<span class='fa fa-sort'></span></td>
                        <td>时长<span class='fa fa-sort'></span></td>
                        <td>是否试听<span class='fa fa-sort'></span></td>
                        <td>上传时间<span class='fa fa-sort'></span></td>
                        <td>上线时间<span class='fa fa-sort'></span></td>
                        <td>变更时间<span class='fa fa-sort'></span></td>
                        <td>状态<span class='fa fa-sort'></span></td>
                        <td>操作<span class='fa fa-sort'></span></td>
                    </tr>
                    <tr ng-repeat='item in list'>
                        <td>{{item.id || '未知'}}</td>
                        <td>{{item.sim_title || '未知'}}</td>
                        <td><a href='{{item.banner}}' target='_blank'>查看</a></td>
                        <td>{{item.audio_time || 0}}秒</td>
                        <td>{{item.is_try_text || '未知'}}</td>
                        <td>{{item.create_date || '未知'}}</td>
                        <td>{{item.online_date || '未知'}}</td>
                        <td>{{item.update_date || '未知'}}</td>
                        <td>
                            <span class='label label-success' ng-if='item.status == 1'>
                                {{item.status_text || '未知'}}
                            </span>
                            <span class='label label-warning' ng-if='item.status == 2'>
                                {{item.status_text || '未知'}}
                            </span>
                        </td>
                        <td>
                            <button class='btn btn-primary btn-xs btn-w-xs' ng-click='get_item(item)'>编辑</button>
                            <button class='btn btn-danger btn-xs btn-w-xs' ng-click='delete(item.id)'>删除</button>
                        </td>
                    </tr>
                </table>
            </div>
            <div class='tab-pane fade' id='list-normal'>
                <table class='table table-list'>
                    <tr>
                        <td>电台ID <span class='fa fa-sort'></span></td>
                        <td>标题<span class='fa fa-sort'></span></td>
                        <td>横幅<span class='fa fa-sort'></span></td>
                        <td>时长<span class='fa fa-sort'></span></td>
                        <td>是否试听<span class='fa fa-sort'></span></td>
                        <td>上传时间<span class='fa fa-sort'></span></td>
                        <td>上线时间<span class='fa fa-sort'></span></td>
                        <td>变更时间<span class='fa fa-sort'></span></td>
                        <td>状态<span class='fa fa-sort'></span></td>
                        <td>操作<span class='fa fa-sort'></span></td>
                    </tr>
                    <tr ng-repeat='item in list'>
                        <td>{{item.id || '未知'}}</td>
                        <td>{{item.sim_title || '未知'}}</td>
                        <td><a href='{{item.banner}}' target='_blank'>查看</a></td>
                        <td>{{item.audio_time || 0}}秒</td>
                        <td>{{item.is_try_text || '未知'}}</td>
                        <td>{{item.create_date || '未知'}}</td>
                        <td>{{item.online_date || '未知'}}</td>
                        <td>{{item.update_date || '未知'}}</td>
                        <td>
                            <span class='label label-success' ng-if='item.status == 1'>
                                {{item.status_text || '未知'}}
                            </span>
                            <span class='label label-warning' ng-if='item.status == 2'>
                                {{item.status_text || '未知'}}
                            </span>
                        </td>
                        <td>
                            <button class='btn btn-primary btn-xs btn-w-xs' ng-click='get_item(item)'>编辑</button>
                            <button class='btn btn-danger btn-xs btn-w-xs' ng-click='delete(item.id)'>删除</button>
                        </td>
                    </tr>
                </table>
            </div>
            <div class='tab-pane fade' id='list-try'>
                <table class='table table-list'>
                    <tr>
                        <td>电台ID <span class='fa fa-sort'></span></td>
                        <td>标题<span class='fa fa-sort'></span></td>
                        <td>横幅<span class='fa fa-sort'></span></td>
                        <td>时长<span class='fa fa-sort'></span></td>
                        <td>是否试听<span class='fa fa-sort'></span></td>
                        <td>上传时间<span class='fa fa-sort'></span></td>
                        <td>上线时间<span class='fa fa-sort'></span></td>
                        <td>变更时间<span class='fa fa-sort'></span></td>
                        <td>状态<span class='fa fa-sort'></span></td>
                        <td>操作<span class='fa fa-sort'></span></td>
                    </tr>
                    <tr ng-repeat='item in list'>
                        <td>{{item.id || '未知'}}</td>
                        <td>{{item.sim_title || '未知'}}</td>
                        <td><a href='{{item.banner}}' target='_blank'>查看</a></td>
                        <td>{{item.audio_time || 0}}秒</td>
                        <td>{{item.is_try_text || '未知'}}</td>
                        <td>{{item.create_date || '未知'}}</td>
                        <td>{{item.online_date || '未知'}}</td>
                        <td>{{item.update_date || '未知'}}</td>
                        <td>
                            <span class='label label-success' ng-if='item.status == 1'>
                                {{item.status_text || '未知'}}
                            </span>
                            <span class='label label-warning' ng-if='item.status == 2'>
                                {{item.status_text || '未知'}}
                            </span>
                        </td>
                        <td>
                            <button class='btn btn-primary btn-xs btn-w-xs' ng-click='get_item(item)'>编辑</button>
                            <button class='btn btn-danger btn-xs btn-w-xs' ng-click='delete(item.id)'>删除</button>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class='box-page' ng-bind-html='pageHtml'></div>
    </div>

    <!-- 电台添加模态窗 -->
    <div class='modal fade add-radio'>
        <div class='modal-dialog modal-lg'>
            <div class='modal-content' align='center'>
                <div class='modal-header'>
                    晨间电台添加
                    <a class='close' data-dismiss='modal'>&times;</a>
                </div>
                <div class='modal-body'>
                    <table class='table-form'>
                        <tr>
                            <td class='td-label'>电台标题:</td>
                            <td colspan='3'>
                                <input type='text' class='form-control' ng-model='aItem.title'>
                            </td>
                        </tr>
                        <tr>
                            <td class='td-label'>是否试听:</td>
                            <td>
                                <div class='box-radio'>
                                    <input type='radio' ng-model='aItem.is_try' value='1'>
                                    <label>是</label>
                                </div>
                                <div class='box-radio'>
                                    <input type='radio' ng-model='aItem.is_try' value='0'>
                                    <label>否</label>
                                </div>
                            </td>
                            <td colspan='2'></td>
                        </tr>
                        <tr>
                            <td class='td-label'>电台横幅:</td>
                            <td>
                                <div class='box-upload'>
                                    <button class='btn btn-primary btn-upload-show'>上传</button>
                                    <button class='btn-upload' id='upload-banner'></button>
                                </div>
                            </td>
                            <td class='td-label'>电台声音:</td>
                            <td>
                                <div class='box-upload'>
                                    <button class='btn btn-primary btn-upload-show'>上传</button>
                                    <button class='btn-upload' id='upload-audio'></button>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan='4'>
                                <div class='box-image'><img ng-src='{{aItem.banner}}'></div>
                            </td>
                        </tr>
                        <tr>
                            <td class='td-label'>电台内容:</td>
                            <td colspan='3'>
                                <textarea id='a-content' class='wang-editor' style='height:200px;'></textarea>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class='modal-footer'>
                    <button class='btn btn-primary btn-sm btn-w-sm' ng-click='add_item()'>确认</button>
                    <button class='btn btn-default btn-sm btn-w-sm' data-dismiss='modal'>取消</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 电台编辑模态窗 -->
    <div class='modal fade edit-radio'>
        <div class='modal-dialog'>
            <div class='modal-content' align='center'>
                <div class='modal-header'>
                    晨间电台编辑
                    <a class='close' data-dismiss='modal'>&times;</a>
                </div>
                <div class='modal-body'>
                    <table class='table-form'>
                        <tr>
                            <td class='td-label'>电台标题:</td>
                            <td colspan='3'>
                                <input type='text' class='form-control' ng-model='nItem.title'>
                            </td>
                        </tr>
                        <tr>
                            <td class='td-label'>是否试听:</td>
                            <td>
                                <div class='box-radio'>
                                    <input type='radio' ng-model='nItem.is_try' value='1'>
                                    <label>是</label>
                                </div>
                                <div class='box-radio'>
                                    <input type='radio' ng-model='nItem.is_try' value='0'>
                                    <label>否</label>
                                </div>
                            </td>
                            <td colspan='2'></td>
                        </tr>
                        <tr>
                            <td class='td-label'>电台横幅:</td>
                            <td>
                                <div class='box-upload'>
                                    <button class='btn btn-primary btn-upload-show'>上传</button>
                                    <button class='btn-upload' id='upload-banner-edit'></button>
                                </div>
                            </td>
                            <td class='td-label'>电台声音:</td>
                            <td>
                                <div class='box-upload'>
                                    <button class='btn btn-primary btn-upload-show'>上传</button>
                                    <button class='btn-upload' id='upload-audio-edit'></button>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan='4'>
                                <div class='box-image'><img ng-src='{{nItem.banner}}'></div>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class='modal-footer'>
                    <button class='btn btn-primary btn-sm btn-w-sm' ng-click='update_item(nItem.id, nItem)'>确认</button>
                    <button class='btn btn-default btn-sm btn-w-sm' data-dismiss='modal'>取消</button>
                </div>
            </div>
        </div>
    </div>
</div>